import { PartialType } from '@nestjs/mapped-types';
import { IsOptional, IsString, IsUUID, MinLength } from 'class-validator';
import { DictType } from '../entities/dict-type.entity';

export class SaveDictTypeDto extends PartialType(DictType) {
  @MinLength(1)
  @IsString()
  name: string;

  @IsString()
  @MinLength(4)
  code: string;

  @IsOptional()
  @IsString()
  remark?: string;

  @IsUUID()
  @IsOptional()
  id?: string;
}
